Install prisma and @prisma/client, define models in prisma/schema.prisma, then create a PrismaService that extends PrismaClient and implements OnModuleInit to call $connect(). Register it as a global provider so every module can inject it without importing a module.
PrismaService extends PrismaClient — all Prisma query methods are available directly on the service.
OnModuleInit.$connect() establishes the connection pool on app startup.
Mark PrismaModule as @Global() so PrismaService is available app-wide without individual module imports.
Run npx prisma generate after every schema change to regenerate the typed client.
Use findUniqueOrThrow() instead of findUnique() to get a typed error when the record is not found.